/** 
 * File-Name:User.java
 *
 * Created on 2011-6-2 上午11:05:56
 * 
 * @author: Neo (neolimeng@gmail.com)
 * Software Engineering Institute, Peking University, China
 * 
 * Copyright (c) 2009, Peking University
 * 
 *
 */
package xiaoyou.entity;

import xiaoyou.neoutil.StringEncrypt;

/**
 * Description: User Information.
 * 
 * @author: Neo (neolimeng@gmail.com) Software Engineering Institute, Peking
 *          University, China
 * @version 1.0 2011-6-2 上午11:05:56
 */
public class User {
	public static final int ADMINISTRATOR = 1;
	public static final int USER = 2;
	private long id;
	private String name;
	private String email;
	private String password;
	private int role = USER;
	private int entityStatus = 1;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = StringEncrypt.encrypt(password);
	}

	public int getRole() {
		return role;
	}

	public void setRole(int role) {
		this.role = role;
	}

	public int getEntityStatus() {
		return entityStatus;
	}

	public void setEntityStatus(int entityStatus) {
		this.entityStatus = entityStatus;
	}
}
